﻿<UserControl x:Class="Probel.Ldoc.Views.Controls.Correctors.InsuranceSpellingCorectorView"
             
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:t="clr-namespace:Probel.Ldoc.Views.Properties"
             
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <DataTemplate x:Key="InsuranceTemplate">
            <Border BorderThickness="5" CornerRadius="8">
                <Border.Effect>
                    <DropShadowEffect Color="#FFB6B6B6"/>
                </Border.Effect>
                <Border.Background>
                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        <GradientStop Color="#FFD3DCEF"/>
                        <GradientStop Color="#FFEAEFF7" Offset="0.896"/>
                    </LinearGradientBrush>
                </Border.Background>
                <Grid Background="{x:Null}" Margin="0,0,0,5">
                    <TextBlock Text="{Binding Name}" 
                               HorizontalAlignment="Center" 
                               FontWeight="Bold" FontSize="13.333"/>
                </Grid>
            </Border>
        </DataTemplate>
        <DataTemplate x:Key="InsuranceDoubloon">
            <!--<Border BorderThickness="5" CornerRadius="8">
                <Border.Effect>
                    <DropShadowEffect Color="#FFB6B6B6"/>
                </Border.Effect>
                <Border.Background>
                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        <GradientStop Color="#FFD3DCEF"/>
                        <GradientStop Color="#FFEAEFF7" Offset="0.896"/>
                    </LinearGradientBrush>
                </Border.Background>
                <StackPanel Background="{x:Null}" Margin="0,0,0,5">
                    <TextBlock Text="{Binding Name}" 
                               HorizontalAlignment="Center" 
                               FontWeight="Bold" FontSize="13.333"/>
                </StackPanel>
            </Border>-->
            <Border BorderThickness="5" CornerRadius="8">
                <Border.Effect>
                    <DropShadowEffect Color="#FFB6B6B6"/>
                </Border.Effect>
                <Border.Background>
                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        <GradientStop Color="#FFD3DCEF"/>
                        <GradientStop Color="#FFEAEFF7" Offset="0.896"/>
                    </LinearGradientBrush>
                </Border.Background>
                <Grid Background="{x:Null}" Margin="0,0,0,5">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border BorderThickness="0,0,0,1" Margin="0" BorderBrush="#FFD2D2D2">
                        <TextBlock Text="{Binding Name}"                                       
                                   HorizontalAlignment="Center" 
                                   FontWeight="Bold" FontSize="13.333"/>
                    </Border>
                    <StackPanel Grid.Row="1" 
								Background="#FFEAEFF7">
                        <StackPanel DockPanel.Dock="Bottom">
                            <StackPanel>
                                <TextBlock Width="Auto"
                                           DockPanel.Dock="Top"
                                           HorizontalAlignment="Left">
                                    <Run Text="{x:Static t:Messages.Lbl_Phone}" FontWeight="Bold"/>
                                    <Run Text="{Binding Phone}"/>
                                </TextBlock>
                                <TextBlock Width="Auto"
                                           HorizontalAlignment="Left">
                                    <Run Text="{x:Static t:Messages.Lbl_Address}" 
                                         FontWeight="Bold"/>
                                    <TextBlock>
                                        <Run Text="{Binding Address.Street}"/>
                                        <Run Text=","/>
                                        <Run Text="{Binding Address.StreetNumber}"/>
                                        <Run Text="{Binding Addres.PostalBox}"/>
                                     </TextBlock>
                                    <TextBlock>
                                        <Run Text="{Binding Address.City}"/>
                                        <Run Text="{Binding Address.PostalCode}"/>
                                    </TextBlock>
                                </TextBlock>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </Border>
        </DataTemplate>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="4*"/>
        </Grid.ColumnDefinitions>
        <ListView ItemsSource="{Binding ItemsToFix}"
                  SelectedItem="{Binding SelectedItem}"
                  ItemTemplate="{DynamicResource InsuranceTemplate}"
                  HorizontalContentAlignment="Stretch"/>
        <ListView Grid.Column="1"
                  ItemsSource="{Binding SubItems}"
                  SelectedItem="{Binding SelectedFix}"
                  ItemTemplate="{DynamicResource InsuranceDoubloon}"
                  HorizontalContentAlignment="Stretch"/>
    </Grid>
</UserControl>
